package com.ccp.dev.workflow.model;

import com.ccp.dev.core.basic.model.BaseModel;

import java.util.Date;
import java.util.Objects;

/**
 * 对象功能:沟通接收人 Model对象
 * 开发公司:SF
 * 开发人员:xxx
 * 创建时间:2013-04-09 19:44:59
 */
public class CommuReceiver extends BaseModel<CommuReceiver>
{
	/**
	 * 未读
	 */
	public final static Integer NOT_READ=0;
	/**
	 * 已读
	 */
	public final static Integer READED=1;
	/**
	 * 已反馈
	 */
	public final static Integer FEEDBACK=2;
	/**
	 * 已取消
	 */
	public final static Integer CANCEL=3;

	/**
	 * 主键
	 */
	private String  id;
	/**
	 * 意见ID
	 */
	private String  opinionId;
	/**
	 * 接收人ID
	 */
	private String  recevierId;
	/**
	 * 接收人
	 */
	private String  receiverName;
	/**
	 * 状态 (0 未读,1,已阅,2,已反馈,3,已取消）
	 */
	private Integer  status=0;
	/**
	 * 接收时间
	 */
	private Date receiveTime;

	/**
	 * 反馈时间
	 */
	private Date  feedbackTime;

	/**
	 * 任务id
	 */
	private String  taskId;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getOpinionId() {
		return opinionId;
	}

	public void setOpinionId(String opinionId) {
		this.opinionId = opinionId;
	}

	public String getRecevierId() {
		return recevierId;
	}

	public void setRecevierId(String recevierId) {
		this.recevierId = recevierId;
	}

	public String getReceiverName() {
		return receiverName;
	}

	public void setReceiverName(String receiverName) {
		this.receiverName = receiverName;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Date getReceiveTime() {
		return receiveTime;
	}

	public void setReceiveTime(Date receiveTime) {
		this.receiveTime = receiveTime;
	}

	public Date getFeedbackTime() {
		return feedbackTime;
	}

	public void setFeedbackTime(Date feedbackTime) {
		this.feedbackTime = feedbackTime;
	}

	public String getTaskId() {
		return taskId;
	}

	public void setTaskId(String taskId) {
		this.taskId = taskId;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) {
			return true;
		}
		if (o == null || getClass() != o.getClass()) {
			return false;
		}
		CommuReceiver that = (CommuReceiver) o;
		return Objects.equals(id, that.id) &&
				Objects.equals(opinionId, that.opinionId) &&
				Objects.equals(recevierId, that.recevierId) &&
				Objects.equals(receiverName, that.receiverName) &&
				Objects.equals(status, that.status) &&
				Objects.equals(receiveTime, that.receiveTime) &&
				Objects.equals(feedbackTime, that.feedbackTime) &&
				Objects.equals(taskId, that.taskId);
	}

	@Override
	public int hashCode() {

		return Objects.hash(id, opinionId, recevierId, receiverName, status, receiveTime, feedbackTime, taskId);
	}

	@Override
	public String toString() {
		return "CommuReceiver{" +
				"id='" + id + '\'' +
				", opinionId='" + opinionId + '\'' +
				", recevierId='" + recevierId + '\'' +
				", receiverName='" + receiverName + '\'' +
				", status=" + status +
				", receiveTime=" + receiveTime +
				", feedbackTime=" + feedbackTime +
				", taskId='" + taskId + '\'' +
				'}';
	}
}